package com.neu.dao.impl;

import com.neu.dao.AdminDao;
import com.neu.dao.BaseDao;

import java.util.List;
import java.util.Map;

public class AdminDaoImpl extends BaseDao implements AdminDao {
    @Override
    public Map<String,Object> login(String name,String pwd){
        Map<String,Object> map = null;
        String sql="SELECT *FROM tbl_admin\n" +
                "WHERE admin_name = ? AND admin_pwd = md5(?)";
        List<Map<String,Object>> list = super.executeQuery(sql,name,pwd);
        if (list.size()>0){
            map = list.get(0);
        }
        return map;
    }
}
